<?php 
/**
 * @file $HeadURL: article.php $
 * @author $Author: DongJC (dongjianchang@haibao.com) $
 * @date $Date: 2015-3-3 ����12:11:00 $
 * @brief
 */

namespace haibao\cms\model\data;

class Calendar extends Base {
	/*
	 * 删除
	 */
	const STATUS_DELETE = 1;
	/*
	 * 未删除
	*/
	const STATUS_ENABLE = 0;
	
	public $ArticleId;
	public $Title;
	public $HotImageId;
	public $Status = 1;
	public $CreateBy;
	public $CreateName = '';
	public $CreateTime;	
	
	public $HotImageUrl = '';
	public $CalendarMonth = '';
	public $CalendarDay = '';
	public $ArticleInfo = '';
	public $ArticleUrl = '';
	
	public $PicInfo = '';
	
	/**
	 * relation 变量
	 */
	public $CalendarPicPoint = array();
	public $CalendarProduct = array();
	public $CalendarRelAttr = array();
	
	public function __construct() {
		parent::__construct ();
		$this->stringField ( 'Title', 'Title', true );
		$this->intField ( 'ArticleId', 'ArticleId', true );
		$this->intField ( 'HotImageId', 'HotImageId', true );
		$this->intField ( 'CreateBy', 'CreateBy', true );
		$this->dateField ( 'CreateTime', 'CreateTime', true );
		
		$this->relationManyField('CalendarPicPoint', '\haibao\cms\model\data\CalendarPicPoint', 'CalendarId');
		$this->relationManyField('CalendarProduct', '\haibao\cms\model\data\CalendarProduct', 'CalendarId');
		$this->relationManyField('CalendarRelAttr', '\haibao\cms\model\data\CalendarRelAttr', 'CalendarId');
		
		$this->setTableName('CalendarIndex');
	}
}

?>